package com.qf.sb3.service.impl;

import com.qf.sb3.entity.Attractions;
import com.qf.sb3.mapper.AttractionsMapper;
import com.qf.sb3.service.AttractionsService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
public class AttractionsServiceImpl implements AttractionsService {
    @Resource
    private AttractionsMapper attractionsMapper;

    @Override
    public List<Attractions> QueryAll() {
        return attractionsMapper.selectList(null);
    }

    @Transactional
    @Override
    public int add(Attractions attractions) {
        int insert = attractionsMapper.insert(attractions);
        return insert;

    }
}
